<!--公共页面-->
<template>
	<view class="content" id="app">
	  <BackHeader />
	  <view class="grid" :style="{ 'min-height': `calc(100vh - ${height + 20}px)` }">
		<view class="page-name" v-if="pageName">{{pageName}}</view>
		<slot name="main"></slot>
	  </view>
	</view>
</template>

<script setup>
	import { ref } from "vue";
	import BackHeader from "@/components/Header/BackHeader.vue";
	import { useStore } from "vuex";
	const store = useStore();
	
	let height = ref(store.state.headerHeight);
	
	let props = defineProps({
		pageName:{
			type: String,
			default: ''
		}
	})
</script>

<style lang="scss" scoped>
	.content {
	  padding: 40rpx 20rpx 0rpx;
	}
	.page-name {
	  padding-bottom: 40rpx;
	}
</style>